Skip to content

BUG: Preserve bounds when resampling merge inputs#932

Draft
sapunyangkut wants to merge 1 commit into
corteva:masterfrom
sapunyangkut:codex/issue-859-merge-bounds
Draft

BUG: Preserve bounds when resampling merge inputs#932
sapunyangkut wants to merge 1 commit into
corteva:masterfrom
sapunyangkut:codex/issue-859-merge-bounds

Conversation

@sapunyangkut

Copy link
Copy Markdown

Summary

  • preserve the cropped data window when Rasterio requests merge resampling
  • derive the destination transform from the requested window and output shape
  • add Rasterio-oracle coverage for unset, pixel-aligned, and fractional bounds
  • document the bug fix in the unreleased history

Root cause

RasterioDatasetDuck.read correctly cropped the source with isel_window, but its shape-mismatch branch discarded that crop and reprojected the full source using the full-source transform. With fractional bounds, this sampled from the dataset origin instead of the requested window.

Closes #859.

Validation

The preserved exact-base-SHA validation package records:

  • bounds matrix: 3 passed
  • merge integration suite: 11 passed, 2 expected xfails
  • adjacent window tests: 3 passed
  • Black, isort, Flake8, and git diff --check: passed

For this publication worktree, the 70-entry evidence manifest and the production/test patch were reverified; AST parsing, Black, Flake8, and git diff --check also passed. The currently installed Python environment does not include rasterio and xarray, so the targeted pytest command stopped during test configuration and no fresh pytest pass is claimed. No dependency changes are included.

Checklist

AI assistance disclosure

OpenAI Codex prepared the implementation, regression test, validation record, and pull request description on behalf of @sapunyangkut. The AI-assisted nature of this contribution is disclosed here for maintainer review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug when using bounds in merge_arrays

1 participant